<div class="container-fluid">

        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/">Chirashi</a>
        </div>
        <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
          	<?php if(AuthComponent::user()){ 
          		$user = AuthComponent::user();
          		if($user['Group']['name'] == 'admins'){?>
          	
            <li><a href="/admin/index">Admin</a></li>
            <?php }?>
            <li><a href="/adminposts/profile/<?php echo $user['id']?>">Profile</a></li>
            <li><a href="/users/logout">Log out</a></li>
            <?php }else{?>
            <li><a href="/users/login">Login</a></li>
            <?php }?>
          </ul>
          <form class="navbar-form navbar-right" action="/adminposts/search" method="get">
          	<input name="user" type="hidden" value="<?php echo $user['id']?>" />
            <input name="title" type="text" class="form-control" placeholder="Search..." value="<?php if(isset($_GET['title'])) echo $_GET['title'];?>"/>
            <button type="submit" class="btn btn-default">
				<span class=" glyphicon glyphicon-search"></span>
			</button>
          </form>
        </div>
</div>